package com.zjb.wxlisener.control;

import com.zjb.wxlisener.JavaBean.PlayerList;
import com.zjb.wxlisener.JavaBean.Result;
import com.zjb.wxlisener.service.PlayerListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/playerlist")
public class PlayerListControl {
    @Autowired
    PlayerListService playerListService;

    @GetMapping("/selct")
    public Result getPlayerList(String belong){
        List<PlayerList> playerlist = playerListService.getPlayerList(belong);
        return Result.success(playerlist);
    }
}
